package com.findyou.controller;

import com.findyou.result.Result;
import com.findyou.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @Title: ItemController
 * @Author 贾金博
 * @Package com.findyou.controller
 * @Date 2025/6/8 下午1:03
 * @description: 接收对文章的请求的
 */
@RestController
@RequestMapping("/item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @GetMapping("/findItemByType")
    public Result<?> findItemByType(int type) {
        return Result.success(itemService.findItemsByType(type));
    }

}
